# -*- coding: utf-8 _*_
# @Software : PyCharm
# @File : models.py
# @TIME : 2024/10/20 12:53

from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

# 数据库模型
class WarnRule(db.Model):
    __tablename__ = 'warn_rule'

    id = db.Column(db.BigInteger, primary_key=True)
    mac_prefix = db.Column(db.String(255), nullable=False)
    ip = db.Column(db.String(255))
    remark = db.Column(db.String(255))
    type = db.Column(db.String(255))
    user_id = db.Column(db.Text)
    update_time = db.Column(db.DateTime)
    create_time = db.Column(db.DateTime)